package com.easylinkin.linkappapi.deviceservice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.easylinkin.linkappapi.deviceservice.entity.DeviceServices;
import com.easylinkin.linkappapi.openapi.dto.ApiDownResultDTO;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author TongJie
 * @since 2020-04-15
 */
public interface DeviceServiceService extends IService<DeviceServices> {

    List<DeviceServices> getDeviceServicesList(DeviceServices deviceServices);

    /**
     * 向设备发送命令
     *
     */
    ApiDownResultDTO send(DeviceServices deviceServices);

    /**
     * 批量设备控制指令下发
     * @param deviceServices
     * @param delay 是否延迟
     * @return
     */
    ApiDownResultDTO batchDeviceSend(DeviceServices deviceServices, Boolean delay);

    /**
     * 向设备发送命令 参数
     * @param downParameter 参数
     * @return 发送结果
     */
    ApiDownResultDTO send(Map<String, Object> downParameter);

    /**
     * 向闸机发送命令 参数
     * @param downParameter 参数
     * @return 发送结果
     */
    ApiDownResultDTO sendToGate(Map<String, Object> downParameter);

    /**
     * @return 记录日志详情
     */
    String downSendLogMessage(Map<String, Object> downParameter);

}
